<?php


class Model_Base_VirtualHost extends Doctrine_Record {

    public function setTableDefinition()
    {
        $this->setTableName('virtual_hosts');
        
        $this->hasColumn('id', 'integer', 4, array (
            'type' => 'integer',
            'unsigned' => true,
            'primary' => true,
            'notnull'  => true,
            'autoincrement' => true,
        ));
        
        $this->hasColumn('projects_id', 'integer', 5);
        
        $this->hasColumn('server_address', 'string', 16);
        $this->hasColumn('server_port', 'integer', 5);
        
        $this->hasColumn('server_admin', 'string', 64);
        $this->hasColumn('server_name', 'string', 64);
        $this->hasColumn('server_alias', 'string', 64);
        $this->hasColumn('document_root', 'string', 128);
        
        $this->hasColumn('created', 'timestamp');
        $this->hasColumn('updated', 'timestamp');
        
    }
	//======================================================================================================
    
    public function setUp()
    {
        $this->hasOne('Model_Project as project', array(
            'local' => 'projects_id',
            'foreign' => 'id'
        ));
    
    }
    //======================================================================================================
};
